package com.project.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.boot.logging.java.JavaLoggingSystem;

import java.io.Serializable;

/**
 * 商品实体
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_product")
public class Product implements Serializable {

    private static final long serialVersionUID = 1L;

    /** 商品编号*/
    @TableId(value = "pk_productId", type = IdType.AUTO)
    private Integer productId;

    /** 商品名*/
    @TableField("p_name")
    private String name;

    /** 类别*/
    @TableField("p_type")
    private String type;

    /** 图片*/
    @TableField("p_imgPath")
    private String imgPath;

    /** 建议采购价*/
    @TableField("p_buyPrice")
    private Integer buyPrice;

    /** 建议销售价*/
    @TableField("p_sellPrice")
    private Integer sellPrice;

    /** 供应商ID*/
    @TableField("fk_factoryId")
    private Integer factoryId;

    /** 厂家*/
    @TableField("p_factory")
    private String factory;

    /** 采购数量*/
    @TableField("p_storeNum")
    private Integer storeNum;

    /** 供应商对象*/
    @TableField(exist = false)
    private Factory factoryObj;


}
